Cannot print passed parameter value
Cannot print passed parameter value
Hello
I can made this and is working-> SELECT * FROM {Variable1}
But I want to print or view in text expresion {Variable1} not working?
Expression in Text property of 'Text1' can't be evaluated! [object Object]
Why?
Thank you for you answer.
I can made this and is working-> SELECT * FROM {Variable1}
But I want to print or view in text expresion {Variable1} not working?
Expression in Text property of 'Text1' can't be evaluated! [object Object]
Why?
Thank you for you answer.
Re: Cannot print passed parameter value
Hello.
It should work right.
Could you send us a sample report template?
Thank you.
It should work right.
Could you send us a sample report template?
Thank you.
Re: Cannot print passed parameter value
Hello
I have the filter for the database in $_SESSION["variable1"] the name for the company in $_SESSION["company"]
In handler.php I set the values to
$event->parameters["variable1"] = $_SESSION["variable1"];
$event->parameters["company"] = $_SESSION["company"];
I work with SELECT * FROM table WHERE {Variable1} is OK
But the header Band, i want to see the name of Company, Address and other values.
I have a field, ExpressionText {company}
I think those parameters are only for the data sources and if so, where I configure so that I can take them as a field for the header band.
Thank you.
I have the filter for the database in $_SESSION["variable1"] the name for the company in $_SESSION["company"]
In handler.php I set the values to
$event->parameters["variable1"] = $_SESSION["variable1"];
$event->parameters["company"] = $_SESSION["company"];
I work with SELECT * FROM table WHERE {Variable1} is OK
But the header Band, i want to see the name of Company, Address and other values.
I have a field, ExpressionText {company}
I think those parameters are only for the data sources and if so, where I configure so that I can take them as a field for the header band.
Thank you.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Cannot print passed parameter value
Hello,
Please send us your report for analysis
Thank you.
Please send us your report for analysis
Thank you.
Re: Cannot print passed parameter value
Hello
Here my report
Table
DROP TABLE IF EXISTS `trademarks`;
CREATE TABLE IF NOT EXISTS `trademarks` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Trademark` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `trademarks`
--
INSERT INTO `trademarks` (`ID`, `Trademark`) VALUES
(1, 'BMW'),
(2, 'Cadillac'),
(3, 'Dodge'),
(4, 'Ford'),
(5, 'GMC'),
(6, 'Jaguar'),
(7, 'Lexus'),
(8, 'Mercedes-Benz'),
(9, 'Nissan'),
(10, 'Rolls-Royce'),
(11, 'Toyota');
COMMIT;
*************************************
handler.php
/// Filter only by Ford is working
$event->parameters["Variable1"] = "'Ford'";
/// Company Name
$event->parameters["Company"] = "'Company Ford'";
Thank you.
Here my report
Table
DROP TABLE IF EXISTS `trademarks`;
CREATE TABLE IF NOT EXISTS `trademarks` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Trademark` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `trademarks`
--
INSERT INTO `trademarks` (`ID`, `Trademark`) VALUES
(1, 'BMW'),
(2, 'Cadillac'),
(3, 'Dodge'),
(4, 'Ford'),
(5, 'GMC'),
(6, 'Jaguar'),
(7, 'Lexus'),
(8, 'Mercedes-Benz'),
(9, 'Nissan'),
(10, 'Rolls-Royce'),
(11, 'Toyota');
COMMIT;
*************************************
handler.php
/// Filter only by Ford is working
$event->parameters["Variable1"] = "'Ford'";
/// Company Name
$event->parameters["Company"] = "'Company Ford'";
Thank you.
- Attachments
-
- trademark.mrt
- (15.93 KiB) Downloaded 205 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Cannot print passed parameter value
Hello,
Please try to add your Company variable to the dictionary.
Thank you.
Please try to add your Company variable to the dictionary.
Thank you.
Re: Cannot print passed parameter value
Hello
I don't understand.
I tried the following:
1- In report design, I made new variable
Name: Ncomp
Init: Expresion
Expression: {Company}
It does not work.
My new question too is, How I see my Filter in my Report.
I want to see in the header.
Trademark Filter: Ford <--{Variable1} Company : Company Ford <--{Company}
Can you please explain in more detail an example if possible.
Thank you
I don't understand.
I tried the following:
1- In report design, I made new variable
Name: Ncomp
Init: Expresion
Expression: {Company}
It does not work.
My new question too is, How I see my Filter in my Report.
I want to see in the header.
Trademark Filter: Ford <--{Variable1} Company : Company Ford <--{Company}
Can you please explain in more detail an example if possible.
Thank you
Re: Cannot print passed parameter value
Hello
I have it. The partial solucion is:
In desing create the variable with same name company
And put the next code in viewer.php and designer.php
// Load and show report
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("localization/en.xml", true);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("reports/reportname.mrt");
/// New Code for update company variables
report.dictionary.variables.getByName("company").valueObject="Company 123";
viewer.report = report;
And that is, the variable is ready for the report.
Thank you.
I have it. The partial solucion is:
In desing create the variable with same name company
And put the next code in viewer.php and designer.php
// Load and show report
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("localization/en.xml", true);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("reports/reportname.mrt");
/// New Code for update company variables
report.dictionary.variables.getByName("company").valueObject="Company 123";
viewer.report = report;
And that is, the variable is ready for the report.
Thank you.
Last edited by gegar on Thu Jan 17, 2019 1:04 pm, edited 1 time in total.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Cannot print passed parameter value
Hello
We are always glad to help you!
Thank you.
We are always glad to help you!
Thank you.
Re: Cannot print passed parameter value
New Question????
Now I want to create the new variable for code: ????
This solution not work.
// Load and show report
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("localization/en.xml", true);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("reports/report.mrt");
report.dictionary.variables.getByName("company").valueObject="Company 123";
// New variable Address
var variables = new Stimulsoft.Report.Dictionary.StiVariable();
variables.name = "Address";
variables.alias = "Address";
variables.type = Stimulsoft.System.StimulsoftStringList;
variables.requestFromUser = false;
variables.value = "123456789";
viewer.report = report;
viewtopic.php?f=18&t=56088&p=149110&hil ... de#p149110
Where I find the complete code to create it by php, I have tried some solutions but they do not work???
Someone have the code for create variable in .
Thanks.
Now I want to create the new variable for code: ????
This solution not work.
// Load and show report
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("localization/en.xml", true);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("reports/report.mrt");
report.dictionary.variables.getByName("company").valueObject="Company 123";
// New variable Address
var variables = new Stimulsoft.Report.Dictionary.StiVariable();
variables.name = "Address";
variables.alias = "Address";
variables.type = Stimulsoft.System.StimulsoftStringList;
variables.requestFromUser = false;
variables.value = "123456789";
viewer.report = report;
viewtopic.php?f=18&t=56088&p=149110&hil ... de#p149110
Where I find the complete code to create it by php, I have tried some solutions but they do not work???
Someone have the code for create variable in .
Thanks.
Last edited by gegar on Fri Jan 18, 2019 2:53 pm, edited 1 time in total.