How to integrate mydbr in cakephp

(83 posts) (2 voices)
  1. radhey_krish, Member

    I fixed the has calculation many thanks to myDBR Team for great supports.

  2. radhey_krish, Member

    How can I make the access level(Admin users and non admin users) of reports using SSO?

  3. myDBR Team, Key Master

    Please see the Single Sign-On section in the myDBR documentation.

    --
    myDBR Team

  4. radhey_krish, Member

    Many thanks to myDBR Team,

    Is there any option to hide the header and footer without using &hdr=0 in url due to running the reports?

    I want tho hide header and footer from the procedure.

  5. radhey_krish, Member

    Below is the my procedure and want to hide the header and footer due to running this reports. I already added this line(SELECT 'dbr.report', 'sp_DBR_CampaignReport', 1, 'inVar=1', 'append=&hdr=0';) in procedure and clear the cache also but didn't remove the header and footer due to running this report. Please have a look in below procedure is there any wrong information?

    DROP PROCEDURE IF EXISTS sp_DBR_CampaignReports
    $$
    CREATE PROCEDURE sp_DBR_CampaignReports(lookupCampaignId int(10))
    BEGIN

    SELECT 'dbr.report', 'sp_DBR_CampaignReport', 1, 'inVar=1', 'append=&hdr=0';
    SELECT 'dbr.chart', 'StackedBar', '2D Stacked Bar', 600, 300;
    SELECT 'dbr.keepwithnext';
    SELECT 'dbr.title', '';
    SELECT m.module_no,if (d.status=1 OR d.status=2,'Live',if(d.status=9,'Draft',if(d.id is null, 'No Documents','Not Live')))
    as status, count(d.id)
    FROM cm_campaign_modules m left join dnrf_values v on m.module_no=v.mod_number
    left join dnrf_prefixes p on v.id=p.dnrf_value_id
    left JOIN frf_documents d on p.id=d.dnrf_id
    WHERE m.campaign_id=lookupCampaignId
    group by m.module_no,status,2;

    SELECT 'dbr.chart', 'Pie', '2D Pie', 600, 300;
    SELECT 'dbr.report', 'sp_DBR_CampaignReport', 1, 'inVar=1', 'append=&hdr=0';
    SELECT 'dbr.keepwithnext';
    SELECT 'dbr.title', '';
    SELECT if (d.status=1 OR d.status=2,'Live',if(d.status=9,'Draft','Not Live'))
    as status, count(d.id)
    FROM frf_documents d JOIN dnrf_prefixes p on p.id=d.dnrf_id
    join dnrf_values v on v.id=p.dnrf_value_id
    join cm_campaign_modules m on m.module_no=v.mod_number
    WHERE m.campaign_id=lookupCampaignId
    GROUP BY status;

    END
    $$

  6. myDBR Team, Key Master

    SELECT 'dbr.report', 'sp_DBR_CampaignReport', 1, 'inVar=1', 'append=&hdr=0';

    When setting a linked report to a chart, myDBR will automatically assing the link to a chart. So you should leave out the "1", parameter.

    Please note that the append will have an effect on the linked report.

    --
    myDBR Team

  7. radhey_krish, Member

    Then how can hide the header and footer for below chart? Can you tell me the syntax?
    One more thing how can i pass the &hdr=0 in url after click on run button in the reports?

    DROP PROCEDURE IF EXISTS sp_DBR_CampaignReports
    $$
    CREATE PROCEDURE sp_DBR_CampaignReports(lookupCampaignId int(10))
    BEGIN

    SELECT 'dbr.chart', 'StackedBar', '2D Stacked Bar', 600, 300;
    SELECT 'dbr.keepwithnext';
    SELECT 'dbr.title', '';
    SELECT m.module_no,if (d.status=1 OR d.status=2,'Live',if(d.status=9,'Draft',if(d.id is null, 'No Documents','Not Live')))
    as status, count(d.id)
    FROM cm_campaign_modules m left join dnrf_values v on m.module_no=v.mod_number
    left join dnrf_prefixes p on v.id=p.dnrf_value_id
    left JOIN frf_documents d on p.id=d.dnrf_id
    WHERE m.campaign_id=lookupCampaignId
    group by m.module_no,status,2;

    END
    $$

  8. myDBR Team, Key Master

    Header (alongside the footer) is part of a user navigation tools. There is currently no way of losing this functionality when you run a single report.

    --
    myDBR Team

  9. radhey_krish, Member

    Hello Team,
    How can I disable the input field in the reports. So that I can per-populated value in input field with readonly(can't change the populated value).

  10. radhey_krish, Member

    its not per-populated value -> Its pre-populated value

  11. myDBR Team, Key Master

    So you want to have parameters without user's ability to enter the parameter values? You can use call/exec to pass on the pre-populated value.

    --
    myDBR Team

  12. radhey_krish, Member

    yes, can you tell me the syntax how to write it.

  13. myDBR Team, Key Master

    Could you elaborate bit more what is the purpose of the parameters that the user is not allowed to change? Would help us to give you a better answer.

    --
    myDBR Team

  14. radhey_krish, Member

    My scenario is: If I logged with my credential on my website then want to display the user graph along with his userid and need to pass this userid as parameter for display the graph.But due to generate the graph anyone can change the userid and see the graph. I want to secure the userid. So that if any one change this value then graph should not be generate.
    Please have a look below url in object tag

    <object height="650px" width="80%" type="text/html" data="http://localhost/sipo.campaign.dev/app/webroot/mydbr/report.php?r=24&u1=12m=4&h=890c2120cd3d0c95d812bcb931245872c600c8ad&hdr=0">
    </object>

    &u1=12 is my session userid. If I change the &u1=10 then graph will generate accordingly.
    So I want to make the security for passing the parameter.So that If any one change this value then graph should not be generated.

  15. myDBR Team, Key Master

    Instead of passing the user-id in the URL you should use Single Sign-On to sync logins with myDBR and your website (assuming the 12 is your website user-id). This way you can directly identify the user within the report without need to pass user-id's in the URL.

    Alternatively, use parameters that cannot be changed by the user. Use 'p' (permanent) instaed of 'u' (user).

    --
    myDBR Team

  16. radhey_krish, Member

    If I am using 'p' instead of 'u' then it is showing like "Report security hash does not match. Report execution aborted."

    I am passing in url like below
    http://localhost/sipo.campaign.dev/app/webroot/mydbr/report.php?r=24&p1=12m=4&h=890c2120cd3d0c95d812bcb931245872c600c8ad&hdr=0

  17. radhey_krish, Member

    Can you tell me the code please.

  18. myDBR Team, Key Master

    Please check the manual for full description with examples.

    --
    myDBR Team

  19. radhey_krish, Member

    I installed Chartdirector for myDBR reports, but when I make the graph type selection Image charts (ChartDirector)options in environment setting then graph is displayed as image charts but lebel text are missing. Please reply soon its urgent.
    Thanks in advance

  20. myDBR Team, Key Master

    Sounds like your ChartDirector install is missing it's fonts. Please follow the ChartDirector install instructions and copy the supplied fonts-directory into PHP extension directory.

    --
    myDBR Team

  21. radhey_krish, Member

    Fixed it.
    Thanks for giving such a good idea.

    Many thanks to myDBR Team

  22. radhey_krish, Member

    Can I pass the database name as a parameter in the reports indirectly? So that I can run the reports currently database selected in connection. For example:
    current database connected to "sipo_camp_dev_db" database
    So now I want to send the sipo_camp_dev_db as dynamically parameter in below procedure.Sometime I want to run this reports on other database server and database name is "MyCampaignDB". So how can I replace this database instead of sipo_camp_dev_db.Is that possible?

    DROP PROCEDURE IF EXISTS sp_DBR_CampaignReports
    $$
    CREATE PROCEDURE sp_DBR_CampaignReports()
    BEGIN
    SELECT 'dbr.title', '';
    SELECT 'dbr.chart', 'StackedBar', '2D Stacked Bar', 600, 300;
    SELECT 'dbr.keepwithnext';
    SELECT m.module_no,if (d.status=1 OR d.status=2,'Live',if(d.status=9,'Draft',if(d.id is null, 'No Documents','Not Live')))
    AS status,COUNT(d.id)
    FROM sipo_camp_dev_db.cm_campaign_modules m
    LEFT JOIN sipo_camp_dev_db.dnrf_values v on m.module_no=v.mod_number
    LEFT JOIN sipo_camp_dev_db.dnrf_prefixes p on v.id=p.dnrf_value_id
    LEFT JOIN sipo_camp_dev_db.frf_documents d on p.id=d.dnrf_id
    WHERE m.campaign_id=12
    GROUP BY m.module_no,status,2;
    END
    $$

  23. myDBR Team, Key Master

    Passing database name as paramerer would require for you to use dynamic SQL which makes life too difficult. As MySQL does not support database aliases, your can use views instead of direct references to tables.

    --
    myDBR Team


Reply

You must log in to post.