1. Jan Steinman
  2. Report Editor
  3. Monday, May 16 2016, 05:32 AM
  4.  Subscribe via email
I want to do something like the ability to change the style of even/odd rows, but only by columns; I want to have records with a certain field that is even show up on the left, and records with that field odd to show up on the right.

I tried the old pivot technique of putting "IF(Rib % 2 = 0, Rib, NULL) AS LRib" and "IF(Rib % 2 = 1, Rib, NULL) AS RRib", but it ends up doing two rows with one column blank in each. I then did GROUP BY Rib, but that didn't change anything.

Any helpful clues about good ways to this?

Thanks!
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Yes, please, file a bug with a copy of the font.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 1
Jan Steinman Accepted Answer
Sergey Pashkov wrote:
Do you create a PDF via "Export" button of the main toolbar or via print dialog?


I created the PDF via "Export," and also printed directly using the print dialog, which looks the same.

I use that font regularly from other applications (Apple Pages, Numbers, etc.) and it seems to work well in those cases

And issue happens always with one font? Is it possible to change to another font and it is ok?


I used a different version of that font (Souvenir Light SSi rather than Souvenir Lt BT), and it seems to print properly.

I just used that font (Souvenir Lt BT) from Apple Numbers (3.6.2), and it printed perfectly.

Do I need to file a bug report? Should I include a copy of the font file?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 2
Sergey Pashkov Accepted Answer
Do you create a PDF via "Export" button of the main toolbar or via print dialog?
And issue happens always with one font? Is it possible to change to another font and it is ok?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 3
Jan Steinman Accepted Answer
Thanks, Sergey.

I think I'm getting somewhere with sub reports, but I'm having font problems. The text shows up fine in Valentina Studio, but when either printed or exported as PDF, some of the text is a mess.

First image below is a screenshot from within Valentina Studio, the second is from Preview of the PDF.

Any suggestions?
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 4
Jan Steinman Accepted Answer
Thanks, Sergey.

I think I'm getting somewhere with sub reports, but I'm having font problems. The text shows up fine in Valentina Studio, but when either printed or exported as PDF, some of the text is a mess.

Any suggestions?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 5
Jan Steinman Accepted Answer
Thanks for the encouragement, Sergey. I will go take another look at subreports. I can't recall why I stopped going down that path before...
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 6
Sergey Pashkov Accepted Answer
Looks like subreports can work here like you've described.

One subreport can print the left part and the second - the right part.

Each subreport has own query, and it can be linked to the main report.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 7
Sergey Pashkov Accepted Answer
There are two uses for these parameters:
1. Parameters can be changed in code, using ADK method VReport.SetParameterValue.
2. Parameters are used for subreports to link query of the subreport to the query of the main report
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 8
Jan Steinman Accepted Answer
One other thing I noticed that I saw on a tab in the query editing modal dialogue, was parameters.

How do parameter values get changed? I could not see any way in the report to pass a parameter in to modify a query.

If I could tell the query to show ever or odd via a parameter that is based on information from the report, that might do what I want. I started down that path, but couldn't figure out how to change the parameter.
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 9
Jan Steinman Accepted Answer
"Could you provide complete sql query?"

The data model is based on a greenhouse with steel supporting ribs every four feet apart. Planting beds lie directly below each rib. Each rib is numbered, with even on the north side, and odd on the south side.

My goal is to produce a report that looks like the physical layout, so our volunteers and students can quickly identify the special needs of each greenhouse planting.

<code>
SELECT
IF(Rib % 2 = 0, gh.Rib, NULL) NRib,
IF(Rib % 2 = 1, gh.Rib, NULL) SRib,
IF(Rib % 2 = 0, CONCAT(plants.genus, ' ', plants.species), NULL) NLatin,
IF(Rib % 2 = 1, CONCAT(plants.genus, ' ', plants.species), NULL) SLatin,
IF(Rib % 2 = 0, gh.Note, NULL) NNote,
IF(Rib % 2 = 1, gh.Note, NULL) SNote,
IF(Rib % 2 = 0, CONCAT(plants.common), NULL) NCommon,
IF(Rib % 2 = 1, CONCAT(plants.common), NULL) SCommon
FROM s_greenhouse_layout_log gh
LEFT JOIN s_plants plants ON gh.plant = plants.id
WHERE gh.Rib < 24
AND (Note NOT LIKE 'DO NOT %' OR Note IS NULL)
GROUP BY gh.Rib
</code>

I made a report that I hoped would work, but it resulted in alternating blanks where the NULLs end up.

I tried changing data/datasource/query, thinking I could use separate queries for the left and right half, but apparently, that is global to the report. I tried using sub reports for the two columns, but got bogged down in some problem — if you think that is a fruitful approach, I can go work on it some more.

I think allowing multiple queries on the same report would solve this problem (and I can see how it could be generally useful beyond this one case), but I haven't been able to figure that out from looking at the videos and tutorials.

Thanks in advance for any advice offered!
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 10
Sergey Pashkov Accepted Answer
Not the cleanest solution.
Is this feature required in multiple reports/projects or only once?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 11
Sergey Pashkov Accepted Answer
Hi Jan,

I can see that the only option is to define a conditional style for even/odd rows.
But it doesn't allow to hide controls, however it is possible to set the colour of text to match the region background.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 12
Ivan Smahin Accepted Answer
It is all about MySQL or Valentina db? Could you provide complete sql query?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Report Editor
  3. # 13
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories